global keepers1964 ""


numlabel, add

genl yr=1964
global keepers1964 $keepers1964 yr

genl id=v2
global keepers1964 $keepers1964 id

genl income=v16
genl income3=income
centile income, c(33 66 100)
replace income3=0 if income<=r(c_1)
centile income, c(33 66 100)
replace income3=1 if income>r(c_1) & income<=r(c_2)
centile income, c(33 66 100)
replace income3=2 if income>r(c_2) & income<=r(c_3)
global keepers1964 $keepers1964 income3

genl vote_ce=v146
recode vote_ce 2=1 .=. else=0
global keepers1964 $keepers1964 vote_ce

genl vote_gov=vote_ce
global keepers1964 $keepers1964 vote_gov


genl gpi=abs(v67-4)/3

genl socref=v75
recode socref 8=2.5
replace socref=abs(socref-4)/3

genl degree=v203
recode degree 6=1 1/5=0



// Class/occupation

gen class_reho_3cat = v193
recode class_reho_3cat 1/7=3 10/24=2 30/40=1
label variable class_reho_3cat "Social class (3 cats.): higher value is higher class"
*label define LblClassGrade 1 "A: (Higher man.; prof." 2 "B: Lower man.; admin." 3 "C1A: Skilled; supervis. non-manu." 4 "C1B: Lower non-manu." 5 "C2: Skilled manu." 6 "D: Unskilled manu."
*label values class_head_grade LblClassGrade
global keepers1964 $keepers1964 class_reho_3cat

gen class_husb_3cat = v202
recode class_husb_3cat 1/7=3 10/24=2 30/40=1
label variable class_husb_3cat "Social class (3 cats.): higher value is higher class"
*label define LblClassGrade 1 "A: (Higher man.; prof." 2 "B: Lower man.; admin." 3 "C1A: Skilled; supervis. non-manu." 4 "C1B: Lower non-manu." 5 "C2: Skilled manu." 6 "D: Unskilled manu."
*label values class_head_grade LblClassGrade
global keepers1964 $keepers1964 class_husb_3cat

gen male = v10
recode male 1=1 2=0
global keepers1964 $keepers1964 male

gen married = v11
recode married 1=1 2=0 3=0 4=0
global keepers1964 $keepers1964 married

gen unionmem_resp = v199
recode unionmem_resp 1/5=1 8=0 0=0
global keepers1964 $keepers1964 unionmem_resp



// Pascal/SM moderators

quietly tabulate v112, generate(toomuchpower_)
rename toomuchpower_1 toomuchpower_collarunion
rename toomuchpower_2 toomuchpower_labor
rename toomuchpower_3 toomuchpower_Business
rename toomuchpower_9 toomuchpower_Entrepreneurs

foreach var of varlist   v76 v77 v79 v78 v80 {
        gen Z`var'=`var'
		replace Z`var'=1 if `var'==4
		replace Z`var'=2 if `var'==3
		replace Z`var'=2.5 if `var'==8
		replace Z`var'=3 if `var'==2
		replace Z`var'=4 if `var'==1
		replace Z`var'=(Z`var'-1)/3
		
		tab Z`var' `var', m
}
 
rename Zv76 econ_control
lab var  econ_control "1=agree state control limit bank and industry influence"

rename Zv77 enc_saving
lab var enc_saving "1=agree with policies encouraging saving and free enterpise"

rename Zv78 group_equality
lab var group_equality "1=agree with group equality"

rename Zv79 imp_state_ressources
lab var imp_state_ressources "1=social security ressources more important then tax reduction"

rename Zv80 more_to_individual
lab var more_to_individual "1=more to individual via tax reduction"

tab v76 econ_control, m

gen imp_winner=.
replace imp_winner=1 if v68==1
replace imp_winner=0.5 if v68==3 | v68==8
replace imp_winner=0 if v68==5
tab v68 imp_winner, m

lab var imp_winner "1=which party win the election is important"

gen talk_politic_family=.
replace talk_politic_family=1 if v186==1
replace talk_politic_family=0.5 if v186==3 | v186==8
replace talk_politic_family=0 if v186==5
tab v186 talk_politic_family, m

lab var talk_politic_family "1=often talk politic with family" 
 
foreach var of varlist  v28 v29 {
        gen Z`var'=`var'
		replace Z`var'=1 if `var'==4
		replace Z`var'=2 if `var'==3
		replace Z`var'=2.5 if `var'==8
		replace Z`var'=3 if `var'==2
		replace Z`var'=4 if `var'==1
		replace Z`var'=(Z`var'-1)/3
		tab Z`var' `var', m
}
  
   
  
rename Zv29 newspaper_politics
lab var newspaper_politics "1=read more politic articles"

rename Zv28 newspaper_international
lab var newspaper_international "1=read more international newsarticles"


foreach var of varlist enc_saving toomuchpower_collarunion  toomuchpower_Business toomuchpower_Entrepreneurs imp_state_ressources group_equality {
        gen anti_`var'=.
		replace anti_`var'=0.3333333 if `var'>0.5 & `var'<1
		replace anti_`var'=0.6666666 if `var'>0 & `var'<0.5
		replace anti_`var'=1 if `var'==0
		replace anti_`var'=0.5 if `var'==0.5
		replace anti_`var'=0 if `var'==1
		tab anti_`var' `var', m
}

gen anti_econ_control=.
replace anti_econ_control=0.3333333 if econ_control>0.5 & econ_control<1
replace anti_econ_control=0.6666666 if econ_control>0 & econ_control<0.5
replace anti_econ_control=1 if econ_control==0
replace anti_econ_control=0.5 if econ_control==0.5
replace anti_econ_control=0 if econ_control==1
tab anti_econ_control econ_control, m

gen anti_more_to_individual=.
replace anti_more_to_individual=0.3333333 if more_to_individual>0.5 & more_to_individual<1
replace anti_more_to_individual=0.6666666 if more_to_individual>0 & more_to_individual<0.5
replace anti_more_to_individual=1 if more_to_individual==0
replace anti_more_to_individual=0.5 if more_to_individual==0.5
replace anti_more_to_individual=0 if more_to_individual==1
tab anti_more_to_individual more_to_individual, m

gen index_interest=( gpi +newspaper_politics+ newspaper_international +talk_politic_family  )/4
global keepers1964 $keepers1964 index_interest

gen index_market_oriented=(socref+ enc_saving +anti_imp_state_ressources +group_equality+ econ_control +more_to_individual)/6
global keepers1964 $keepers1964 index_market_oriented
